<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>函数的两种写法</title>
</head>
<body>
<div id="app">
    {{count}}
    <p>
        <button @click="click">click1</button>
        <button @click="click2">click2</button>
    </p>
</div>
</body>
</html>
<script src="js/vue.js"></script>
<script>
    new Vue({
        el:'#app',
        data:{
            count : 0
        },
        methods:{
            click : function(){
                this.count++
            },
            click2(){
                this.count++
            }
        }
    })
</script>